if (!("finalizeConstruction" in ViewPU.prototype)) {
    Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
}
class ButtonConfig {
    constructor() {
        this.text = '我知道了';
        this.color = '';
        this.cb = () => {
        };
    }
}
export class EcDialogTips extends ViewPU {
    constructor(k19, l19, m19, n19 = -1, o19 = undefined, p19) {
        super(k19, m19, n19, p19);
        if (typeof o19 === "function") {
            this.paramsGenerator_ = o19;
        }
        this.title = '提示';
        this.titleAlign = 'start';
        this.tipsContent = this.DefaultTipsContent;
        this.confirmButton = null;
        this.cancelButton = null;
        this.controller = undefined;
        this.setInitiallyProvidedValue(l19);
        this.finalizeConstruction();
    }
    setInitiallyProvidedValue(j19) {
        if (j19.title !== undefined) {
            this.title = j19.title;
        }
        if (j19.titleAlign !== undefined) {
            this.titleAlign = j19.titleAlign;
        }
        if (j19.tipsContent !== undefined) {
            this.tipsContent = j19.tipsContent;
        }
        if (j19.confirmButton !== undefined) {
            this.confirmButton = j19.confirmButton;
        }
        if (j19.cancelButton !== undefined) {
            this.cancelButton = j19.cancelButton;
        }
        if (j19.controller !== undefined) {
            this.controller = j19.controller;
        }
    }
    updateStateVars(i19) {
    }
    purgeVariableDependenciesOnElmtId(h19) {
    }
    aboutToBeDeleted() {
        SubscriberManager.Get().delete(this.id__());
        this.aboutToBeDeletedInternal();
    }
    DefaultTipsContent(d19 = null) {
        this.observeComponentCreation2((f19, g19) => {
            Text.create('默认提示！');
        }, Text);
        Text.pop();
    }
    setController(c19) {
        this.
            controller = c19;
    }
    initialRender() {
        this.observeComponentCreation2((a19, b19) => {
            Column.create();
            Column.backgroundColor(null);
            Column.linearGradient(null);
        }, Column);
        this.observeComponentCreation2((y18, z18) => {
            Row.create();
            Row.width('100%');
            Row.justifyContent(this.titleAlign === 'start' ? FlexAlign.Start : FlexAlign.Center);
            Row.padding({ left: 18, right: 18 });
            Row.height(56);
        }, Row);
        this.observeComponentCreation2((w18, x18) => {
            Text.create(this.title);
            Text.fontColor({ "id": -1, "type": 10001, params: ['app.color.yk_mid_19'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
            Text.fontSize(18);
            Text.fontWeight(500);
        }, Text);
        Text.pop();
        Row.pop();
        this.tipsContent.bind(this)();
        this.observeComponentCreation2((u18, v18) => {
            Divider.create();
            Divider.color({ "id": -1, "type": 10001, params: ['app.color.yk_mid_line'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
            Divider.margin({ left: 15, right: 15 });
        }, Divider);
        this.observeComponentCreation2((s18, t18) => {
            Row.create();
            Row.width('100%');
            Row.margin({ top: 10, bottom: 10 });
            Row.justifyContent(FlexAlign.SpaceAround);
        }, Row);
        this.observeComponentCreation2((p18, q18) => {
            Button.createWithLabel(this.cancelButton?.text);
            Button.onClick(() => {
                this.cancelButton?.cb && this.cancelButton?.cb();
            });
            Button.fontSize({ "id": -1, "type": 10002, params: ['app.float.yk_module_title_font_size'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
            Button.backgroundColor('transparent');
            Button.fontColor(this.cancelButton?.color || { "id": -1, "type": 10001, params: ['app.color.yk_mid_59'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
        }, Button);
        Button.pop();
        this.observeComponentCreation2((e18, f18) => {
            If.create();
            if (this.confirmButton?.text) {
                this.ifElseBranchUpdateFunction(0, () => {
                    this.observeComponentCreation2((n18, o18) => {
                        Divider.create();
                        Divider.vertical(true);
                        Divider.height(24);
                        Divider.color({ "id": -1, "type": 10001, params: ['app.color.yk_mid_99'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
                    }, Divider);
                    this.observeComponentCreation2((k18, l18) => {
                        Button.createWithLabel(this.confirmButton?.text);
                        Button.onClick(() => {
                            this.confirmButton?.cb && this.confirmButton?.cb();
                        });
                        Button.fontSize({ "id": -1, "type": 10002, params: ['app.float.yk_module_title_font_size'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
                        Button.backgroundColor('transparent');
                        Button.fontColor(this.confirmButton?.color || { "id": -1, "type": 10001, params: ['app.color.yk_main_color'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
                    }, Button);
                    Button.pop();
                });
            }
            else {
                this.ifElseBranchUpdateFunction(1, () => {
                });
            }
        }, If);
        If.pop();
        Row.pop();
        Column.pop();
    }
    rerender() {
        this.updateDirtyElements();
    }
}
